import { get, post} from '../utils/http';
import { API_COMMENT_LIST, API_COMMENT_LIKE, API_COMMENT_DELETE, API_COMMENT_ADD, urlFormat} from '../common/constants';

/**
 * 评论列表
 */
exports.getCommentList = (lessonId, params) => {
    return get(urlFormat(API_COMMENT_LIST, {lessonId: lessonId}),params);
};
/**
 * 点赞
 */
exports.likeComment = (commentId) => {
    return post(urlFormat(API_COMMENT_LIKE, {commentId: commentId}));
};
/**
 * 删除评论
 */
exports.deleteComment = (commentId) => {
    return post(urlFormat(API_COMMENT_DELETE, {commentId: commentId}));
};

/**
 * 新增评论
 */

 exports.addComment = (params) => {
     return post(API_COMMENT_ADD,params);
 };